function page(pageInfo) {
    $(".pageList").html("");
    let $lis = "";
    let isFirstPage = "";
    if (pageInfo.isFirstPage) {
        isFirstPage = `class="disabled"`;
    }
    let isLastPage = "";
    if (pageInfo.isLastPage) {
        isLastPage = `class="disabled"`;
    }
    $(pageInfo.navigatepageNums).each(function () {
        let isActive = "";
        if (pageInfo.pageNum == this) {
            isActive = `class="active"`;
        }
        $lis += `<li ` + isActive + ` data-pagenum="` + this + `"><a href="javascript:void(0)">` + this + `</a></li>`;
    });
    let $nav = `<nav aria-label="Page navigation">
                            <ul class="pagination">
                            <li data-pagenum="1"><a href="javascript:void(0)">首页</a></li>
                              <li ` + isFirstPage + ` data-pagenum="` + pageInfo.prePage + `">
                                <a href="#" aria-label="Previous">
                                  <span aria-hidden="true">&laquo;</span>
                                </a>
                              </li>
                              ` + $lis + `
                              <li ` + isLastPage + ` data-pagenum="` + pageInfo.nextPage + `">
                                <a href="javascript:void(0)" aria-label="Next">
                                  <span aria-hidden="true">&raquo;</span>
                                </a>
                              </li>
                              <li data-pagenum="` + pageInfo.pages + `"><a href="javascript:void(0)">尾页</a></li>
                            </ul>
                          </nav>`;
    $(".pageList").append($nav);
}

let globalPageNum = 0;
let globalSize = 0;

$("body").on("click", ".pagination li", function () {
    let pageNum = $(this).data("pagenum");
    if ($(this).prop("class") == 'disabled') {
        return;
    } else {
        loadData(pageNum);//调用成员变量
        setPage(pageNum);
    }
});